home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / CONEXION / PPP-OFF < prev    next >
Encoding:
Text File  |  1997-02-06  |  513 b   |  28 lines

  1. #!/bin/sh
  2.  
  3. DEVICE=ppp0
  4. unlock cua1
  5. #
  6. # If the ppp0 pid file is present then the program is running. Stop it.
  7. if [ -r /var/run/$DEVICE.pid ]; then
  8.     kill -INT `cat /var/run/$DEVICE.pid`
  9. #
  10. # If unsuccessful, ensure that the pid file is removed.
  11. #
  12.     if [ ! "$?" = "0" ]; then
  13.         echo "removing stale $DEVICE pid file."
  14.         rm -f /var/run/$DEVICE.pid
  15.         exit 1
  16.     fi
  17. #
  18. # Success. Terminate with proper status.
  19. #
  20.     echo "$DEVICE link terminated"
  21.     exit 0
  22. fi
  23. #
  24. # The link is not active
  25. #
  26. echo "$DEVICE link is not active"
  27. exit 1
  28.